<!DOCTYPE html>
<html th:fragment="layout (title, maincontent)" xmlns:th="http://www.thymeleaf.org">
<head>
    <title th:replace="${title}">Layout Title</title>
</head>
<body>

<div th:replace="${maincontent}">
    <p>maincontent</p>
</div>

<footer>
    Layout footer
</footer>

</body>
</html>